package com.mystudyspring.studySpringBoot.dao;


import com.mystudyspring.studySpringBoot.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * UserRepository
 *
 * @author lix
 * @create 2018-03-30 14:28
 */
public interface UserRepository extends JpaRepository<User, Long> {
    /**
     * findUserByName
     * @param userName
     * @return User
     */
    User findUserByName(String userName);

    User findUserById(Long id);

    User findUserByNameOrAge(String userName, Integer age);
}
